<?php
/**
 * +----------------------------------------------------------------------
 * | 模型
 * +----------------------------------------------------------------------
 *                      _ooOoo_
 *                     o8888888o            | AUTHOR: 杜云
 *                     88" . "88            | EMAIL: 987772927@qq.com
 *                     (| -_- |)            | QQ: 987772927
 *                     O\  =  /O            | WECHAT: 987772927
 *                  ____/`---'\____
 *                .'  \\|     |//  `.
 *               /  \\|||  :  |||//  \
 *              /  _||||| -:- |||||-  \
 *              |   | \\\  -  /// |   |
 *              | \_|  ''\-/''  |   |
 *              \  .-\__  `-`  ___/-. /
 *            ___`. .'  /-.-\  `. . __
 *         ."" '<  `.___\_<|>_/___.'  >'"".
 *        | | :  `- \`.;`\ _ /`;.`/ - ` : | |
 *        \  \ `-.   \_ __\ /__ _/   .-` /  /
 *   ======`-.____`-.___\_____/___.-`____.-'======
 *                      `=-='
 * +----------------------------------------------------------------------
 */
declare (strict_types=1);
namespace App\Model;

/**
 * @property int $id
 * @property int $type
 * @property string $operation_name
 * @property string $server_name
 * @property string $server_addr
 * @property string $remote_addr
 * @property string $forwarded_for
 * @property string $real_ip
 * @property int $city_id
 * @property string $user_agent
 * @property string $platform
 * @property string $device
 * @property string $browser
 * @property string $url
 * @property string $uri
 * @property string $arguments
 * @property string $method
 * @property string $uuid
 * @property string $user_id
 * @property string $referer
 * @property int $unix_time
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 */
class UserOplog extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'user_oplogs';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['type','mid','operation_name','server_name','server_addr','remote_addr','forwarded_for','real_ip','city_id','user_agent','platform','device','browser','url','uri','arguments','method','uuid','user_id','referer','created_at','updated_at'];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer','mid' => 'integer','city_id' => 'integer','created_at' => 'datetime', 'updated_at' => 'datetime'];
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
}